﻿<%@ Application Language="C#" %>
<%@ Import Namespace="System.Web.Routing" %>
<%@ Import Namespace="ServiceStack.Text" %>

<script runat="server">

    public static void RegisterRoutes(RouteCollection routes)
    {
        
        
        routes.MapPageRoute("Login", "login", "~/pages/Login.aspx");
        routes.MapPageRoute("LogAdmin", "log", "~/pages/Config/Log.aspx");
        routes.MapPageRoute("Menu", "menu", "~/pages/Config/Menu.aspx");
        routes.MapPageRoute("Role", "role", "~/pages/Config/Role.aspx");
        routes.MapPageRoute("Admin", "admin", "~/pages/Config/Admin.aspx");
        routes.MapPageRoute("Admin Info", "admininfo", "~/pages/Config/AdminInfo.aspx");
        routes.MapPageRoute("Admin ChangePass", "changepass", "~/pages/Config/ChangePass.aspx");

        routes.MapPageRoute("Game Config", "configgame", "~/pages/Game/ConfigGame.aspx");
        routes.MapPageRoute("Game jackport", "jackport", "~/pages/Game/JackPort.aspx");

        routes.MapPageRoute("PaymentIn config", "configpaymentin", "~/pages/Payment/ConfigPaymentIn.aspx");
        routes.MapPageRoute("PaymentOut config", "configpaymentout", "~/pages/Payment/ConfigPaymentOut.aspx");

        routes.MapPageRoute("ItemIn ", "itemin", "~/pages/Payment/ItemIn.aspx");
        routes.MapPageRoute("ItemOut ", "itemout", "~/pages/Payment/ItemOut.aspx");
        
        routes.MapPageRoute("Ag to Au config", "configagtoau", "~/pages/Payment/ConfigAgToAu.aspx");

        routes.MapPageRoute("Account", "account", "~/pages/Account/Account.aspx");

        routes.MapPageRoute("Report PaymentIn", "rptpaymentin", "~/pages/Report/ReportPaymentIn.aspx");
        routes.MapPageRoute("Report PaymentOut", "rptpaymentout", "~/pages/Report/ReportPaymentOut.aspx");
        routes.MapPageRoute("Report InGame", "rptingame", "~/pages/Report/ReportInGame.aspx");
        routes.MapPageRoute("Report General", "rptgeneral", "~/pages/Report/ReportGeneral.aspx");
        routes.MapPageRoute("Report UserAssets", "rptuserassets", "~/pages/Report/ReportUserAssets.aspx");
        
        routes.MapPageRoute("Content Help", "help", "~/pages/Help.aspx");
        routes.MapPageRoute("home1", "", "~/Default.aspx");
        routes.MapPageRoute("home", "index.htm", "~/Default.aspx");       
    }

    void Application_Start(object sender, EventArgs e) 
    {
        // Code that runs on application startup
        RegisterRoutes(RouteTable.Routes);
    }
    
    void Application_End(object sender, EventArgs e) 
    {
        //  Code that runs on application shutdown

    }
        
    void Application_Error(object sender, EventArgs e) 
    { 
        // Code that runs when an unhandled error occurs

    }

    void Session_Start(object sender, EventArgs e) 
    {
        // Code that runs when a new session is started

    }

    void Session_End(object sender, EventArgs e) 
    {
        // Code that runs when a session ends. 
        // Note: The Session_End event is raised only when the sessionstate mode
        // is set to InProc in the Web.config file. If session mode is set to StateServer 
        // or SQLServer, the event is not raised.

    }
       
</script>
